// AABB.cpp
// 
/////////////////////////////////////////////////////////

#include "AABB.hpp"

AABB::AABB(Vec3f min, Vec3f max)
{
    this->min = min;
    this->max = max;
}

Vec3f AABB::GetPointAtCorner(int corner)
{
    switch (corner)
    {
        case 0: return Vec3f(min.x, min.y, min.z);  break;
        case 1: return Vec3f(max.x, min.y, min.z);  break;
        case 2: return Vec3f(min.x, max.y, min.z);  break;
        case 3: return Vec3f(max.x, max.y, min.z);  break;
        case 4: return Vec3f(min.x, min.y, max.z);  break;
        case 5: return Vec3f(max.x, min.y, max.z);  break;
        case 6: return Vec3f(min.x, max.y, max.z);  break;
        case 7: return Vec3f(max.x, max.y, max.z);  break;
        default: return Vec3f(0,0,0);               break;
    }
}
